package ratkit.parameter;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Annotation of the RatKit test method parameters. With this annotation
 * parameters that is used inside the REPAST simulation classes, schedule
 * operation types can be defined by the developer. Using {@code Type}
 * enumeration sweeping type of the parameter can be defined. Using
 * {@code ParameterTypes} type of the current parameter is defined like int,
 * double and string etc...
 * 
 * @author İbrahim Çakırlar
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface RatKitParameter {
	/**
	 * Type of the parameter for the parameter sweeping operations.
	 * 
	 * @author İbrahim Çakırlar
	 * 
	 */
	enum Type {
		CONSTANT, LIST, NUMBER
	};

	/**
	 * Parameter types of the test parameters.
	 * 
	 * @author İbrahim Çakırlar
	 */
	class ParameterTypes {
		public static final String INT = "int";
		public static final String LONG = "long";
		public static final String SHORT = "short";
		public static final String STRING = "string";
		public static final String FLOAT = "float";
		public static final String BOOLEAN = "boolean";
		public static final String DOUBLE = "double";
	}

	/**
	 * Default value of the test parameter. Values of the parameter can be
	 * constant value, blank or comma separated value.
	 * 
	 * @return
	 */
	String parameterValue() default "";

	/**
	 * Name of the parameter that is used in the simulation objects.
	 * 
	 * @return
	 */
	String parameterName() default "";

	/**
	 * Type of the
	 * 
	 * @return
	 */
	String parameterType() default "";

	/**
	 * This field is mantory for Number types parameter for paramete sweeping
	 * operations. From specifies the start index for the parameter value
	 * iteration.
	 * 
	 * @return initial value of the parameter value iteration.
	 */
	String from() default "";

	/**
	 * This field is mantory for Number types parameter for paramete sweeping
	 * operations. To specifies the last value of the parameter value iteration.
	 * 
	 * @return last value of the parameter valur iteration.
	 */
	String to() default "";

	/**
	 * This field is mantory for Number types parameter for paramete sweeping
	 * operations. Step specifies the increment value for the parameter value
	 * iteration.
	 * 
	 * @return increment value for the parameter value iteration
	 */
	String step() default "";

	/**
	 * This field defines the type of the parameter sweeping type. The default
	 * value of the type is {@code Type#CONSTANT}. {@code Type#NUMBER} type
	 * parameters defines the parameter value iteration and {@code Type#LIST}
	 * type parameters defines the static list of values iteration.
	 * 
	 * @return type of the parameter value sweeping.
	 */
	Type type() default RatKitParameter.Type.CONSTANT;

}
